package com.Jiang.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ShopCar {
    private int carId;
    private String userId;
    private int bookId;
    private String bookName;
    private int num;
    private double price;
    private String url;
    public double sumFee(){
        double f =this.num*this.price;
        BigDecimal b   =   new   BigDecimal(f);
        double   f1   =   b.setScale(2,   BigDecimal.ROUND_HALF_UP).doubleValue();
        return f1;
    }
}
